<div class="ibox-content">
    <form id="signupForm" class="form-horizontal m-t" method="post" action="{:\\think\\Url::build('User/submitNickname')}">
        <div class="form-group">
            <label class=" control-label">密码<span class="check-tips">(请输入密码)</span></label>
            <input  class="form-control input-large" type="password" autocomplete="off" name="password">
        </div>
        <div class="form-group">
            <label class="control-label">昵称：<span class="check-tips">(请输入新昵称)</span></label>
            <input name="nickname" class="form-control input-large" autocomplete="off" value="{$info.nickname|default=''}">
        </div>
        <div class="form-group">
            <button class="btn btn-primary" type="submit">提交</button>
        </div>
    </form>
</div>
<script type="text/javascript" src="__JS__/plugins/validate/jquery.validate.min.js"></script>
<script type="text/javascript"> 
    $("#signupForm").validate({
        rules: {
            password: {
                required: true
            },
            nickname: {
                required: true
            }
        },
        messages: {
            password: {
                required: "请输入密码"
            },
            nickname: {
                required: "昵称不能为空"
            }
        },
        submitHandler: function () {
            validateAjax("#signupForm", "button[type='submit']");
            return false;
        }
    });
</script>
